home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / DiskUtil / Directory / RO / Install / RO-Install < prev    next >
Text File  |  1995-07-06  |  7KB  |  350 lines

  1. ; $VER: RO-Install 1.04 (9.7.95)
  2. ; Original RO Installer script by Juergen Schubert <juergen@desert.sub.org>
  3. ; Modified by Oliver Rummeyer, inspired by MagicCX-Install ©1994 Kai Iske.
  4.  
  5. ;========================================================
  6. ; Set Strings
  7.  
  8. (set #nokick
  9. (cat "You must be using Kickstart 2.04 to use RO. Aborting!"
  10. ))
  11.  
  12. (set #nomui
  13. (cat "You need version 2.3 of MUI or better. Aborting!"
  14. ))
  15.  
  16. (set #startmsg
  17. (cat "\n\RO installation script.\n"
  18.      "This script installs RO on your Amiga.\n\n"
  19.      "Read the Documentation files for\n"
  20.      "more information on the distribution.\n"
  21.      "RO © 1994,1995 Oliver Rummeyer\n"
  22.      "All rights reserved."
  23. ))
  24.  
  25. (set #icons "Which type of icons would you like to install")
  26. (set #magicwbicons "MagicWB-Style Icons; 8 colors")
  27. (set #classicicons "Classic-WB-Style Icons; 4 colors")
  28. (set #noicons "No Icons")
  29.  
  30. (set #install "\n\nInstalling RO to\n\n")
  31. (set #drawer
  32. (cat "In which disk or drawer should RO be installed?\n"
  33.      "(A drawer \"RO\" will be created there)"
  34. ))
  35.  
  36. (set #update
  37. (cat "A drawer \"RO\" already exists in the specified disk "
  38.      "or drawer. You should make a backup of your prefs "
  39.      "file before you continue the installation procedure.\n\n"
  40.      "Should I continue the installation procedure?"
  41. ))
  42.  
  43. (set #lang "Which languages should be installed?")
  44. (set #own
  45. (cat    "\n\nIf you want to create own versions of\n"
  46.     "the catalogs pleaser have a look at the\n"
  47.     "distributions Locale directory. You will\n"
  48.     "find the .ct and .cd files there. If you\n"
  49.     "have created you own translations, please\n"
  50.     "don`t keep it a secret"
  51. ))
  52.  
  53. (set #install-docs "Would you like to install RO's documentation?")
  54. (set #doc "Which documentation formats would you like to install?")
  55. (set #doclang "Which language do you prefer for the documentation?")
  56.  
  57. (set #install-rexx "Would you like to install the arexx examples?")
  58. (set #drawer-rexx "In which disk or drawer should the arexx examples be installed?")
  59.  
  60. (set #exitmsg
  61. (cat "Have fun using RO.\n"
  62.      "Please support the shareware concept!\n\n"
  63.      "If you like RO, please send $20.- or DM 30.- to\n\n"
  64.      "Oliver Rummeyer\n"
  65.      "Hochbergstraße 49/1\n"
  66.      "D-88213 Ravensburg\n"
  67.      "Germany/Europe"
  68. ))
  69. ;========================================================
  70.  
  71. (if (< (/ (getversion) 65536) 37)
  72. (
  73.     (abort #nokick)
  74. ))
  75.  
  76. (if (= (exists "LIBS:muimaster.library" (noreq)) 1)
  77. (
  78.     (if (< (/ (getversion "LIBS:muimaster.library") 65536) 10)
  79.     (
  80.         (abort #nomui)
  81.     ))
  82. )
  83. (
  84.     (abort #nomui)
  85. ))
  86.  
  87. ;=========================================================
  88.  
  89. (message #startmsg)
  90.  
  91. (complete 0)
  92.  
  93. ;=========================================================
  94.  
  95. (set IconType
  96.     (askchoice
  97.         (prompt #icons)
  98.         (help @askchoice-help)
  99.         (choices
  100.             #magicwbicons
  101.             #classicicons
  102.             #noicons
  103.         )
  104.         (default 0)
  105.     )
  106. )
  107.  
  108. (complete 15)
  109.  
  110. ;=========================================================
  111.  
  112. (set TargetDir
  113.     (askdir
  114.         (prompt #drawer)
  115.         (default "SYS:Tools")
  116.         (help @askdir-help)
  117.     )
  118. )
  119.  
  120. (set DestDir (tackon TargetDir "RO"))
  121. (set @default-dest DestDir)
  122.  
  123. (if (= (exists DestDir) 2)
  124.    (message #update)
  125. )
  126.  
  127. (complete 30)
  128.  
  129. ;=========================================================
  130.  
  131. (makedir DestDir
  132.     (prompt #install DestDir)
  133. )
  134.  
  135. (if (= IconType 0)
  136. (
  137.        (copyfiles
  138.            (source "")
  139.         (choices "/Icons/8col/RO.info" "/Icons/8col/RO.guide.info" "/Icons/8col/RegForm.info")
  140.            (dest DestDir)
  141.     )
  142.     (copyfiles
  143.         (source "/Icons/8col/Drawer.info")
  144.         (dest TargetDir)
  145.         (newname "RO.info")
  146.     )
  147. ))
  148.  
  149. (if (= IconType 1)
  150. (
  151.        (copyfiles
  152.            (source "")
  153.         (choices "/Icons/4col/RO.info" "/Icons/4col/RO.guide.info" "/Icons/4col/RegForm.info")
  154.            (dest DestDir)
  155.     )
  156.     (copyfiles
  157.         (source "/Icons/4col/Drawer.info")
  158.         (dest TargetDir)
  159.         (newname "RO.info")
  160.     )
  161. ))
  162.  
  163. (copyfiles
  164.     (help @copyfiles-help)
  165.     (source "/Binary/RO,binary")
  166.     (dest DestDir)
  167.     (newname "RO")
  168. )
  169.  
  170. (copyfiles
  171.     (help @copyfiles-help)
  172.     (source "/Config/RO.prefs,default")
  173.     (dest DestDir)
  174.     (newname "RO.prefs")
  175. )
  176.  
  177. (complete 45)
  178.  
  179. ;========================================================
  180. ; Install Locale
  181.  
  182. (if (AND (NOT (= (getassign "Locale") "")) (exists "libs:locale.library"))
  183. (
  184.  
  185.     (set Lang
  186.         (askoptions
  187.             (prompt #lang)
  188.             (help @askoptions-help)
  189.             (choices "Deutsch" "Français" "Italiano")
  190.             (default 0)
  191.         )
  192.     )
  193.  
  194.     (if (IN Lang 0)
  195.         (copyfiles
  196.             (source "")
  197.             (choices "/Locale/Catalogs/Deutsch/ro.catalog")
  198.             (dest "LOCALE:Catalogs/Deutsch")
  199.         )
  200.     )
  201.  
  202.     (if (IN Lang 1)
  203.         (copyfiles
  204.             (source "")
  205.             (choices "/Locale/Catalogs/Français/ro.catalog")
  206.             (dest "LOCALE:Catalogs/Français")
  207.         )
  208.     )
  209.  
  210.     (if (IN Lang 2)
  211.         (copyfiles
  212.             (source "")
  213.             (choices "/Locale/Catalogs/Italiano/ro.catalog")
  214.             (dest "LOCALE:Catalogs/Italiano")
  215.         )
  216.     )
  217.  
  218.     (message #own)
  219. ))
  220.  
  221. (complete 60)
  222.  
  223. ;========================================================
  224. ; Install ARexx Scripts
  225.  
  226. (if (askbool (help @askbool-help) (prompt #install-rexx))
  227. (
  228.     (set RexxDir
  229.     (askdir
  230.         (prompt #drawer-rexx)
  231.         (default "REXX:")
  232.         (help @askdir-help)
  233.     ))
  234.  
  235.        (copyfiles
  236.            (source "")
  237.         (choices
  238.             "/ARexx/Action.RO"
  239.             "/ARexx/AddArc.RO"
  240.             "/ARexx/ArcHandler.RO"
  241.             "/ARexx/Iconify.RO"
  242.             "/ARexx/LoadDir.RO"
  243.             "/ARexx/LoadOther.RO"
  244.             "/ARexx/PlayModule.RO"
  245.         )
  246.            (dest RexxDir)
  247.     )
  248.  
  249. ))
  250.  
  251. (complete 75)
  252.  
  253. ;=========================================================
  254. ; Install Documentation
  255.  
  256. (if (askbool (help @askbool-help) (prompt #install-docs))
  257. (
  258.  
  259.     (set doctype
  260.         (askoptions
  261.             (prompt #doc)
  262.             (help @askoptions-help)
  263.             (choices
  264.                 "AmigaGuide ® V39"
  265.             )
  266.             (default 1)
  267.         )
  268.     )
  269.  
  270.     (if (<> doctype 0)
  271.     (
  272.  
  273.         (set doclang
  274.             (askchoice
  275.                 (prompt #doclang)
  276.                 (help @askchoice-help)
  277.                 (choices
  278.                     "English"
  279.                     "Deutsch"
  280.                     "Français"
  281.                 )
  282.                 (default 0)
  283.             )
  284.         )
  285.     ))
  286.  
  287.     (if (= doctype 1)
  288.     (
  289.  
  290.         (if (= doclang 0)
  291.         (
  292.             (copyfiles
  293.                 (source "/Docs/RO.guide,english")
  294.                 (dest DestDir)
  295.                 (newname "RO.guide")
  296.             )
  297.             (copyfiles
  298.                 (source "/Docs/RegForm,english")
  299.                 (dest DestDir)
  300.                 (newname "RegForm")
  301.             )
  302.         ))
  303.  
  304.         (if (= doclang 1)
  305.         (
  306.             (copyfiles
  307.                 (source "/Docs/RO.guide,deutsch")
  308.                 (dest DestDir)
  309.                 (newname "RO.guide")
  310.             )
  311.             (copyfiles
  312.                 (source "/Docs/RegForm,deutsch")
  313.                 (dest DestDir)
  314.                 (newname "RegForm")
  315.             )
  316.         ))
  317.  
  318.         (if (= doclang 2)
  319.         (
  320.             (copyfiles
  321.                 (source "/Docs/RO.guide,francais")
  322.                 (dest DestDir)
  323.                 (newname "RO.guide")
  324.             )
  325.             (copyfiles
  326.                 (source "/Docs/RegForm,francais")
  327.                 (dest DestDir)
  328.                 (newname "RegForm")
  329.             )
  330.         ))
  331.  
  332.     ))
  333.  
  334.     (if (= doctype 0)
  335.     (
  336.         (delete    (tackon DestDir "RO.guide.info"))
  337.         (delete    (tackon DestDir "RegForm.info"))
  338.     ))
  339.  
  340. )
  341. (
  342.     (delete    (tackon DestDir "RO.guide.info"))
  343.     (delete    (tackon DestDir "RegForm.info"))
  344. ))
  345.  
  346. (complete 100)
  347.  
  348. ;==========================================================
  349. (exit #exitmsg)
  350.